package com.amc.wxSend;

import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;

import java.util.Date;


public class DateTestClass {

    public static void main(String[] args) {

/*        System.out.println(ON_TASK_CENTER_JOB_INFO_ES_INDEX.name());
        Date date = new Date();
        System.out.println(date);
        DateTime dateTime = DateUtil.offset(date, DateField.SECOND, 3);

        System.out.println(dateTime.toString());
        System.out.println(System.currentTimeMillis());
        System.out.println(dateTime.getTime());*/

        testDateOffset();

    }
    private static void testDateOffset(){
        Date date = new Date();
        System.out.println(date);
        DateTime dateTime  = DateUtil.offset(date, DateField.MILLISECOND, 1000 * 60 *2);
        System.out.println(dateTime.toString());
        System.out.println(System.currentTimeMillis());
        System.out.println(dateTime.getTime());
        System.out.println(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));

    }
}
